// 关于产品的所有接口
import axios from '@/apis/axios/index.js'
import axiosp from '@/apis/axios/indexp.js'
const baseUrl = `/erp`
// http://122.112.207.45/api/erp/goodSpu/listPage

// 根据id获取产品信息


export function getInfoForBillDetailById(params) {
	return axios.request({
		url: `${baseUrl}/goodSpu/getGoodsVoById`,
		method: 'post',
		data: params
	})
}
// 产品列表信息
export function getData(params) {
	return axios.request({
		url: `${baseUrl}/goodSpu/listPage`,
		method: 'post',
		data: params
	})
}
// 产品列表新增
export function addData(params) {
	return axios.request({
		url: `${baseUrl}/goodSpu/addOrUpdateData`,
		method: 'post',
		data: params
	})
}
// 产品列表删除

export function delectData(params) {
	return axios.request({
		url: `${baseUrl}/goodSpu/deleteByIds`,
		method: 'post',
		data: params
	})
}
// 产品分类列表信息
export function getCategoryList(params) {
	return axiosp.request({
		url: `${baseUrl}/goodCat/listOptions`,
		method: 'post',
		data: params
	})
}

// 新增产品类别
export function addCategoryData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodCat/saveData`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 删除产品类别
export function delectCategoryData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodCat/delete`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 成品胚布
export function getListClothTypeOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodSpu/listClothTypeOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 供货类型列表
export function getListPriceUnitTypesListAllData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsSupplyType/listAllData`,
		method: 'post',
		data: params
	})
}
// 供货类型
export function getListPriceUnitTypesData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodSpu/listPriceUnitTypes`,
		method: 'post',
		data: params
	})
}
// 新增供货类型
export function addOrUpdatePriceUnitTypesData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsSupplyType/addOrUpdateList`,
		method: 'post',
		data: params
	})
}

// 删除供货类型
export function DeletePriceUnitById(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsSupplyType/deleteById`,
		method: 'post',
		data: params
	})
}

// 标签
export function getListTypesData(params) {
	return axiosp.request({
		url: `${baseUrl}/labelForGoods/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 季度
export function getQuarterListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/quarter/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 季度的新增
export function addUpdateQuarterListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/quarter/addOrUpdateList`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
 
// 季度的删除
export function deleteByIdQuarter(params) {
	return axiosp.request({
		url: `${baseUrl}/quarter/deleteById`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
// 获取季度的所有数据
export function getQuarterListlistAllData(params) {
	return axiosp.request({
		url: `${baseUrl}/quarter/listAllData`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}


// 瓶 斤 等单位
export function getUnitListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/unit/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// cm  mm  单位
export function getGoodsWidthUnitListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsWidthUnit/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
// 获取全部的cm  mm  单位
export function getGoodsWidthUnitListListAllData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsWidthUnit/listAllData`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
// 添加cm  mm  单位
export function addGoodsWidthUnitOrUpdateList(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsWidthUnit/addOrUpdateList`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}


// g  gg  单位
export function getGoodsGramWeightUnitOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsGramWeightUnit/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}


// 获取全部的g  gg  单位
export function getGramsWidthUnitListListAllData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsWidthUnit/listAllData`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
// 添加g  gg  单位
export function addGramsWidthUnitOrUpdateList(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsWidthUnit/addOrUpdateList`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}


// + - x 
export function getGoodsListSpaceDiffTypeOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodSpu/listSpaceDiffTypeOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 查询工艺列表
export function getGoodsTechnologyListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsTechnology/listAllData`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
// 删除工艺	
export function deleteByIdListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsTechnology/deleteById`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
// 新增工艺列表
export function addGoodsTechnologyListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsTechnology/addOrUpdateList`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}


/**
 * 获取 客/供/加
 */
export function getListComeGoOptionsByComeGoTypeData(params) {
	return axiosp.request({
		url: `${baseUrl}/comeGoType/listComeGoOptionsByComeGoType`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

/**
 * 获取 供货类型
 */
export function getGoodsSupplyTypeData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsSupplyType/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

/**
 * 获取 供应商
 */
export function getComeGoTypeTypeData(params) {
	return axiosp.request({
		url: `${baseUrl}/comeGoType/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

/**
 * 获取 色系列表
 */
export function getColorSysData(params) {
	return axiosp.request({
		url: `${baseUrl}/colorSys/listOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
/**
 * 获取 产品的幅宽跟克重
 */
export function listOptionsPageBySpuId(params) {
	return axiosp.request({
		url: `${baseUrl}/goodsWidthGramWeight/listOptionsPageBySpuId`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}
/**
 * 获取 产品的默认信息
 */
export function initAddData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodSpu/initAddData`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}





